package com.cskaoyan.controller;

/**
 * @author pengyehua
 * @date 2020/12/5 20:02
 */

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Brand;
import com.cskaoyan.bean.RegionProvince;
import com.cskaoyan.service.AdminRegionService;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 商场管理模块的行政区域部分
 */
@RestController
@RequestMapping("admin/region")
public class AdminRegionController {

    @Autowired
    AdminRegionService adminRegionService;

    /**
     * 查询品牌商信息
     * @return
     * @throws JsonProcessingException
     */
    @GetMapping("list")
    public BaseRespVo list() throws JsonProcessingException {
        List<RegionProvince> regionList = adminRegionService.queryRegionList();
        return BaseRespVo.ok(regionList);
    }



}
